package com.bicycle.rentalsystem.pojo.admin;

import java.util.List;

/**
 * @author Third uncle
 * @date 2022/11/23 - 20:32
 */
public class Page<T> {

        public static final Integer PAGE_SIZE = 4;
        // 当前页码
        private Integer pageNo;
        // 总页码
        private Integer pageTotal;
        // 当前页显示数量
        private Integer pageSize = PAGE_SIZE;
        // 总记录数
        private Integer pageTotalCount;
        // 当前页数据
        private List<T> items;

        public Page() {
        }

        public Page(Integer pageNo, Integer pageTotal, Integer pageSize, Integer pageTotalCount, List<T> items) {
                this.pageNo = pageNo;
                this.pageTotal = pageTotal;
                this.pageSize = pageSize;
                this.pageTotalCount = pageTotalCount;
                this.items = items;
        }

        @Override
        public String toString() {
                return "Page{" +
                        "pageNo=" + pageNo +
                        ", pageTotal=" + pageTotal +
                        ", pageSize=" + pageSize +
                        ", pageTotalCount=" + pageTotalCount +
                        ", items=" + items +
                        '}';
        }

        public Integer getPageNo() {
                return pageNo;
        }

        public void setPageNo(Integer pageNo) {
                this.pageNo = pageNo;
        }

        public Integer getPageTotal() {
                return pageTotal;
        }

        public void setPageTotal(Integer pageTotal) {
                this.pageTotal = pageTotal;
        }

        public Integer getPageSize() {
                return pageSize;
        }

        public void setPageSize(Integer pageSize) {
                this.pageSize = pageSize;
        }

        public Integer getPageTotalCount() {
                return pageTotalCount;
        }

        public void setPageTotalCount(Integer pageTotalCount) {
                this.pageTotalCount = pageTotalCount;
        }

        public List<T> getItems() {
                return items;
        }

        public void setItems(List<T> items) {
                this.items = items;
        }
}
